package com.qf.springmvc02.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.qf.springmvc02.util.SalarySerializer;
import lombok.Data;

import java.util.Date;

@Data
public class FastUser {

    @JSONField(serialzeFeatures = {SerializerFeature.WriteMapNullValue,SerializerFeature.WriteNullStringAsEmpty})
    private String id;

    @JSONField(name = "name")
    private String username;
    @JSONField(serialize = false)
    private String password;
    private Date birthday;
    @JSONField(format = "yyyy年MM月dd日")
    private Date marryDay;
    @JSONField(serializeUsing = SalarySerializer.class)
    private Double salary;
}
